from multiprocessing import Process
import share

URI_SELF = '793401629@fetion.com.cn;p=1919'

class FetionRobot(Process):
	def __init__(self):
		Process.__init__(self)
	def run(self):
		while(True):
			sms_req = share.SMS_QUEUE.get()
			uri = sms_req[0]
			message = sms_req[1]
			if uri == URI_SELF:
				share.fetion.send_sms(message)
			else:
				share.fetion.send_sms(to, message)

if __name__ == '__main__':
	frobot = FetionRobot()
	frobot.start()
	frobot.join()
